<html>
<head>
<script type="text/javascript" src="../../src/main/js/loader.js"></script>
<script type="text/javascript">

	load('core.util.ImagePreloader');

	function init() {
		window.preloader = new core.util.ImagePreloader();
		window.preloader.addListener({
			onImagePreloaded : function(sender) {
				alert('Image is successfully preloaded: ' + sender.getUrl() + ' (' + sender.getWidth() + 'x' + sender.getHeight() + ')');
			},
			onPreloadFailed : function(sender) {
				alert('Preload failed: ' + sender.getUrl());
			}
		});
	}

</script>
</head>

<body onload="init()">
	URL: <input type="text" id="url" />
	<a href="javascript:preloader.preload(document.getElementById('url').value)">Preload</a>
</body>
</html>